package com.example.basic;

public class DaemonTest implements Runnable{
    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName());
    }

    public static void main(String[] args) {
        DaemonTest daemonTest = new DaemonTest();
        Thread a = new Thread(daemonTest, "A");
        a.setDaemon(true);
        Thread b = new Thread(daemonTest, "B");
        a.start();
        b.start();
        System.out.println("main线程");
    }
}
